/**
 * http://usejsdoc.org/
 * @Client dgram.client
 */
var dgram = require('dgram'),
	client = dgram.createSocket("udp4");

/**创建发送数据 message*/
var message = new Buffer('hi devintamA,node.js is waiting for you!');


var messageb = new Buffer('hi devintamB,node.js is waiting for you!');
/**发送数据到本地41234端口*/
//client.send(message,0,message.length,41234,"127.0.0.1",function(err){
//	client.close();
//});
//client.send(message,41234,"127.0.0.1",function(err){
//	client.close();
//});

client.send([message,messageb],41234,"127.0.0.1",function(err){
	client.close();
});

client.on("message",function(msg,rinfo){
	console.log("client get " + msg+ " from " + rinfo.address + ":" + rinfo.port);
});